const router = require('express').Router();
const upload = require('../utils/upload');

router.post('/upload', upload.single('file'), (req, res) => {
  res.send({
    code: 0,
    msg: '上传成功',
    data: '/static/uploads/' + req.file.filename
  })
})

module.exports = router;